ASurfaceTexture_attachToGLContext

Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread. A new OpenGL ES texture object is created and populated with the SurfaceTexture image frame that was current at the time of the last call to {@link #detachFromGLContext}. This new texture is bound to the GL_TEXTURE_EXTERNAL_OES texture target.

This can be used to access the SurfaceTexture image contents from multiple OpenGL ES contexts. Note, however, that the image contents are only accessible from one OpenGL ES context at a time.

\param st A ASurfaceTexture reference acquired with ASurfaceTexture_fromSurfaceTexture() \param texName The name of the OpenGL ES texture that will be created. This texture name must be unusued in the OpenGL ES context that is current on the calling thread. \return 0 on success, negative posix error code otherwise (see <errno.h>)

extern (C) nothrow @nogc
int
ASurfaceTexture_attachToGLContext

Meta